{template 'common/header'}
<div id="menu">
    <ul class="nav nav-tabs">
        <li {if $_GPC['action'] == ''}class="active"{/if}>
        <a href="{php echo $this->createWebUrl('punch', array('action' => ''));}">成功打卡</a>
        </li>
        <li {if $_GPC['action'] == 'fail'}class="active"{/if}>
        <a href="{php echo $this->createWebUrl('punch', array('action' => 'fail'));}">打卡失败</a>
        </li>
        <li {if $_GPC['action'] == 'mx'}class="active"{/if}>
        <a href="{php echo $this->createWebUrl('punch', array('action' => 'mx'));}">分钱明细</a>
        </li>
    </ul>
</div>


{if $_GPC['action'] ==''}
<table class="table table-hover">
    <thead class="navbar-inner">
    <tr>
        <th>头像</th>
        <th>昵称</th>
        <th>金额</th>
        <th>打卡时间</th>
        <th>回款日期</th>
        <th>预计可分</th>

    </tr>
    </thead>
    <tbody>
    {loop $res $v}
    <tr>
        <td><img src="{php echo $v['headimgurl']}" width="50px" height="50px"></td>
        <td>{$v['nickname']}</td>
        <td>{$v['bonus_num']}</td>
        <td>{$v['daka_datatime']}</td>
        <td>{$v['huikuan_date']}</td>
        <td>{php echo $v['bonus_num']*$jl_money}</td>
    </tr>
    {/loop}
    </tbody>
</table>
<div class="col-xs-12">
    {php echo $pager}
</div>
{/if}

{if $_GPC['action'] =='fail'}
<table class="table table-hover">
    <thead class="navbar-inner">
    <tr>
        <th>头像</th>
        <th>昵称</th>
        <th>打卡金额</th>
        <th>回款日期</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    {loop $res $v}
    <tr>
        <td><img src="{php echo $v['headimgurl']}" width="50px" height="50px"></td>
        <td>{$v['nickname']}</td>
        <td>{$v['yajin_money']}</td>
        <td>{$v['huikuan_date']}</td>
        <td>
            <a class="btn btn-success btn-sm" href="{php echo $this->createWebUrl('punch',array('action'=>'sign', 'id' => $v['id']));}">打卡</a>
        </td>
    </tr>
    {/loop}
    </tbody>
</table>
<div class="col-xs-12">
    {php echo $pager}
</div>
{/if}

{if $_GPC['action'] =='mx'}
<table class="table table-hover">
    <thead class="navbar-inner">
    <tr>
        <th>打卡总金额</th>
        <th>成功人数</th>
        <th>平台提现</th>
        <th>用户可分</th>
        <th>每份奖金</th>
    </tr>
    </thead>
    <tbody>
    <tr>
        <td>{$total_money}</td>
        <td>{php echo count($success)}</td>
        <td>{$yinli_money}</td>
        <td>{$kefen_money} </td>
        <td>{$jl_money} </td>

    </tr>

    </tbody>
</table>
<div class="col-xs-12">
    {php echo $pager}
</div>
{/if}





{template 'common/footer'}
